`shouldShowApp()` is called in `_addFavorite`, so adding a favorite when
this isn't true won't work. Also, it seems when this is false, favorites
that do exist won't be shown anyway.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3342
this._source = source;
+ this._parentalControlsManager = ParentalControlsManager.getDefault();
+
this.actor.add_style_class_name('app-well-menu');
// Chain our visibility and lifecycle to that of the source
});
}
- let canFavorite = global.settings.is_writable('favorite-apps');
+ let canFavorite = global.settings.is_writable('favorite-apps') &&
+ this._parentalControlsManager.shouldShowApp(this._source.app.app_info);
if (canFavorite) {
this._appendSeparator();